@drag-prefix-cls: ~'@{surely-table-prefix-cls}-drag';
@table-header-drag-bg: ~'var(--@{surely-table-prefix-cls}-header-drag-bg)';

.@{drag-prefix-cls} {
  &-handle {
    height: 100%;
    cursor: grab;
    color: inherit;
    font-style: normal;
    line-height: 0;
    text-align: center;
    text-transform: none;
    vertical-align: -0.125em;
    text-rendering: optimizelegibility;
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
    display: flex;
    align-items: center;
    margin-left: 16px;
    user-select: none;
    min-width: 1px;
    flex-grow: 0;
    flex-shrink: 0;
  }
  &-handle-disabled {
    cursor: not-allowed;
    color: ~'var(--@{surely-table-prefix-cls}-disabled-color)';
  }
  &-icon {
    display: inline-block;
  }
  &-dragging {
    cursor: move;
  }
  &-column-dragging {
    background: @table-header-drag-bg;
    .@{surely-table-prefix-cls}-header-cell,
    .@{surely-table-prefix-cls}-cell-group-title {
      background: @table-header-drag-bg;
    }
  }
  &-ghost {
    background: @table-row-hover-bg;
    cursor: move;
  }
  &-placeholder {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: ~'var(--@{surely-table-prefix-cls}-primary-color)';
    z-index: 999;
    opacity: 0;
    transition: opacity 0.2s;
  }
  &-column-placeholder {
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: ~'var(--@{surely-table-prefix-cls}-primary-color)';
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 3;
  }
  &-ghost-image {
    position: absolute;
    display: inline-flex;
    align-items: center;
    cursor: move;
    color: @text-color;
    margin: 0;
    padding: @table-padding-vertical-sm @table-padding-horizontal;
    // transform: translateY(12px);
    white-space: nowrap;
    z-index: 99999;
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;
    // min-height: 30px;
    border: solid 1px;
    border-color: @table-border-color;
    background: @table-row-hover-bg;
    border-radius: @border-radius-base;
    box-shadow: 0 1px 2px 1px ~'var(--@{surely-table-prefix-cls}-ghost-image-shadow-color)';
    font-size: @table-font-size;
    &-icon {
      margin-right: 6px;
      display: inline-block;
      color: inherit;
      font-style: normal;
      line-height: 0;
      text-align: center;
      text-transform: none;
      vertical-align: -0.125em;
      text-rendering: optimizelegibility;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }
    &-label {
      overflow: hidden;
      text-overflow: ellipsis;
      overflow-wrap: break-word;
    }
  }
}
